#导入socket库
import socket

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

#建立与server的连接
s.connect(("127.0.0.1", 9999))

print(s.recv(1024).decode("utf-8"))

while True:
	data = input("HugHoo \n ")
	s.send(data.encode("utf-8"))
	if data == 'exit':
		break
	print("127.0.0.1 : 9999 \n", s.recv(1024).decode("utf-8"))

s.close()
	
	